package cn.cheln.support.notification;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import cn.cheln.explorer.func.setup.PackageInstallService;
import java.util.HashMap;
import java.util.Map;

public class NotifyUtil
{
  public static final int ID_INSTALLED;
  static NotificationManager notificationManager;
  public static Map<Integer, Notification> notificationMap = new HashMap();
  Notification notification = new Notification();

  static
  {
    notificationMap.put(Integer.valueOf(0), new Notification());
  }

  public NotifyUtil(Context paramContext)
  {
    notificationManager = (NotificationManager)paramContext.getSystemService("notification");
  }

  public static void cancel(Context paramContext, int paramInt)
  {
    notificationManager = (NotificationManager)paramContext.getSystemService("notification");
    notificationManager.cancel(paramInt);
  }

  public void notify(int paramInt1, int paramInt2, String paramString1, String paramString2, String paramString3, Intent paramIntent, Context paramContext, Class paramClass)
  {
    Notification localNotification = (Notification)notificationMap.get(Integer.valueOf(paramInt1));
    if (localNotification == null)
      throw new IllegalArgumentException("wrong notifyid " + paramInt1);
    if (paramClass == Activity.class);
    for (PendingIntent localPendingIntent = PendingIntent.getActivity(paramContext.getApplicationContext(), 0, paramIntent, 0); ; localPendingIntent = PendingIntent.getBroadcast(paramContext.getApplicationContext(), 0, paramIntent, 0))
      do
      {
        while (true)
        {
          localNotification.icon = paramInt2;
          localNotification.tickerText = paramString1;
          localNotification.setLatestEventInfo(paramContext.getApplicationContext(), paramString2, paramString3, localPendingIntent);
          if (paramContext.getClass() != PackageInstallService.class)
            break label168;
          ((PackageInstallService)paramContext).startForeground(paramInt1, localNotification);
          return;
          if (paramClass != Service.class)
            break;
          localPendingIntent = PendingIntent.getService(paramContext.getApplicationContext(), 0, paramIntent, 0);
        }
        localPendingIntent = null;
      }
      while (paramClass != BroadcastReceiver.class);
    label168: notificationManager.notify(paramInt1, localNotification);
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.support.notification.NotifyUtil
 * JD-Core Version:    0.5.2
 */